﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Module.Stat.List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/module/stat/style/StatMain.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
    统计管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <asp:HiddenField runat="server" ID="hid_EOKey" />
    <div class="action_bar">
        <asp:Button ID="btn_EOAdd" runat="server" Text="增加" OnClick="btn_EOAdd_Click" />
        <asp:Button ID="btn_EOUpdate" runat="server" Text="修改" OnClientClick="return acu.gv.checkMultiSelect(fixId('gvList'));"
            OnClick="btn_EOUpdate_Click" />
        <asp:Button ID="btn_EODel" runat="server" Text="删除" OnClientClick="return acu.gv.checkDelete(fixId('gvList'));"
            OnClick="btn_EODel_Click" />
    </div>
    <fieldset>
        <legend>统计对象</legend>
        <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="false" CssClass="GridView"
            DataKeyNames="StatKey" AllowPaging="True" PageSize="20" PagerSettings-Mode="Numeric"
            OnPageIndexChanging="gvList_PageIndexChanging" OnRowCommand="gvList_RowCommand">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                            type="checkbox" title="点击全选或反全选当前页所有信息" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle Width="10px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="名称">
                    <ItemTemplate>
                        <a href='Admin/Module/Stat/List.aspx?sid=<%# DataBinder.Eval(Container, "DataItem.StatKey")%>'>
                            <%# DataBinder.Eval(Container, "DataItem.StatName")%></a>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:BoundField DataField="ChartName" HeaderText="图形"></asp:BoundField>
                <asp:TemplateField HeaderText="坐标">
                    <ItemTemplate>
                        X:<%# DataBinder.Eval(Container, "DataItem.XName")%>
                        <br />
                        Y:<%# DataBinder.Eval(Container, "DataItem.YName")%>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="数据源">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container, "DataItem.SrcName")%>
                        <br />
                        （<%# DataBinder.Eval(Container, "DataItem.DataKeyCaption")%>
                        ，<%# DataBinder.Eval(Container, "DataItem.DataTextCaption")%>
                        ，<%# DataBinder.Eval(Container, "DataItem.DataValueCaption")%>）
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="排序列">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container, "DataItem.OrderField")%>
                        <br /><%# DataBinder.Eval(Container, "DataItem.OrderOption")%>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="基线">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container, "DataItem.TrendName")%>
                        <br />
                        <%# DataBinder.Eval(Container, "DataItem.TrendValue")%>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <a href="Admin/Module/Stat/EditStat.aspx?id=<%# DataBinder.Eval(Container, "DataItem.StatKey")%>">编辑</a>
                        | <a href='Admin/Module/Stat/Default.aspx?id=<%# DataBinder.Eval(Container, "DataItem.StatKey")%>'>
                            预览</a>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                共有<asp:Label runat="server" ID="LAB_PAGER_TOTALCOUNT"></asp:Label>条记录 |
                <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                |
                <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:DropDownList runat="server" ID="DDL_PAGER_SELECTOR" OnSelectedIndexChanged="gvPager_OnSelectedIndexChanged"
                    AutoPostBack="true">
                </asp:DropDownList>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                |
                <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
            </PagerTemplate>
            <HeaderStyle CssClass="GridViewHeader" />
            <RowStyle CssClass="GridViewRow" />
            <FooterStyle CssClass="GirdViewFooter" />
            <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
            <PagerStyle CssClass="GridViewPager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
    <div class="action_bar">
        <asp:Button ID="btn_Add3" runat="server" Text="增加参数" OnClick="btn_Add3_Click" />
        <asp:Button ID="btn_Update3" runat="server" Text="修改参数" OnClientClick="return acu.gv.checkMultiSelect(fixId('gvFilter'));"
            OnClick="btn_Update3_Click" />
        <asp:Button ID="btn_Del3" runat="server" Text="删除参数" OnClientClick="return acu.gv.checkDelete(fixId('gvFilter'));"
            OnClick="btn_Del3_Click" />
    </div>
    <fieldset>
        <legend>参数</legend>
        <asp:GridView ID="gvFilter" runat="server" AutoGenerateColumns="false" CssClass="GridView"
            DataKeyNames="ParamKey">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                            type="checkbox" title="点击全选或反全选当前页所有信息" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle Width="10px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="名称">
                    <ItemTemplate>
                        <a href='Admin/Module/Stat/EditParam.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ParamKey")%>'>
                            <%# DataBinder.Eval(Container, "DataItem.ParamTitle")%></a>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:BoundField DataField="ParamLabel" HeaderText="标签"></asp:BoundField>
                <asp:BoundField DataField="ParamTypeName" HeaderText="类型"></asp:BoundField>
                <asp:BoundField DataField="ParamName" HeaderText="字段名"></asp:BoundField>
                <asp:BoundField DataField="DataType" HeaderText="数值类型"></asp:BoundField>
                <asp:BoundField DataField="FormFieldKey" HeaderText="表单项名"></asp:BoundField>
                <asp:BoundField DataField="DefaultValue" HeaderText="缺省值"></asp:BoundField>
                <asp:BoundField DataField="OrderNumber" HeaderText="顺序"></asp:BoundField>
            </Columns>
            <HeaderStyle CssClass="GridViewHeader" />
            <RowStyle CssClass="GridViewRow" />
            <FooterStyle CssClass="GirdViewFooter" />
            <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
            <PagerStyle CssClass="GridViewPager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
    <div class="clear:both;float:none;">
    </div>
    <table cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td valign="top">
                <div class="action_bar">
                    <asp:Button ID="btn_AddSub" runat="server" Text="增加组" OnClick="btn_AddSub_Click" />
                    <asp:Button ID="btn_UpdateSub" runat="server" Text="修改组" OnClientClick="return acu.gv.checkMultiSelect(fixId('gvSubList'));"
                        OnClick="btn_UpdateSub_Click" />
                    <asp:Button ID="btn_DelSub" runat="server" Text="删除组" OnClientClick="return acu.gv.checkDelete(fixId('gvSubList'));"
                        OnClick="btn_DelSub_Click" />
                </div>
                <fieldset style="width: 400px">
                    <legend>系列</legend>
                    <asp:GridView ID="gvSubList" runat="server" AutoGenerateColumns="false" CssClass="GridView"
                        DataKeyNames="SeriesKey">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                                        type="checkbox" title="点击全选或反全选当前页所有信息" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                                </ItemTemplate>
                                <ItemStyle Width="10px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="名称">
                                <ItemTemplate>
                                    <a href='Admin/Module/Stat/EditSeries.aspx?id=<%# DataBinder.Eval(Container, "DataItem.SeriesKey")%>'>
                                        <%# DataBinder.Eval(Container, "DataItem.SeriesTitle")%></a>
                                </ItemTemplate>
                                <ItemStyle />
                            </asp:TemplateField>
                            <asp:BoundField DataField="SeriesParam" HeaderText="字段"></asp:BoundField>
                            <asp:BoundField DataField="SeriesValue" HeaderText="值"></asp:BoundField>
                            <asp:BoundField DataField="RenderAsName" HeaderText="显示为"></asp:BoundField>
                            <asp:BoundField DataField="Color" HeaderText="颜色"></asp:BoundField>
                            <asp:BoundField DataField="OrderNumber" HeaderText="顺序"></asp:BoundField>
                        </Columns>
                        <HeaderStyle CssClass="GridViewHeader" />
                        <RowStyle CssClass="GridViewRow" />
                        <FooterStyle CssClass="GirdViewFooter" />
                        <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
                        <PagerStyle CssClass="GridViewPager" />
                        <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
                        <EmptyDataTemplate>
                            没有可用的数据</EmptyDataTemplate>
                    </asp:GridView>
                </fieldset>
            </td>
            <td valign="top">
                <div class="action_bar">
                    <asp:Button ID="btn_AddColumn" runat="server" Text="增加列" OnClick="btn_AddColumn_Click" />
                    <asp:Button ID="btn_UpdateColumn" runat="server" Text="修改列" OnClientClick="return acu.gv.checkMultiSelect(fixId('gvFilter'));"
                        OnClick="btn_UpdateColumn_Click" />
                    <asp:Button ID="btn_DelColumn" runat="server" Text="删除列" OnClientClick="return acu.gv.checkDelete(fixId('gvFilter'));"
                        OnClick="btn_DelColumn_Click" />
                </div>
                <fieldset style="width: 540px">
                    <legend>扩展列</legend>
                    <asp:GridView ID="gvColumns" runat="server" AutoGenerateColumns="false" CssClass="GridView"
                        DataKeyNames="ColumnKey">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                                        type="checkbox" title="点击全选或反全选当前页所有信息" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                                </ItemTemplate>
                                <ItemStyle Width="10px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="标题">
                                <ItemTemplate>
                                    <a href='Admin/Module/Stat/EditColumn.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ColumnKey")%>'>
                                        <%# DataBinder.Eval(Container, "DataItem.ColumnTitle")%></a>
                                </ItemTemplate>
                                <ItemStyle />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ColumnField" HeaderText="字段"></asp:BoundField>
                            <asp:BoundField DataField="OrderNumber" HeaderText="顺序"></asp:BoundField>
                        </Columns>
                        <HeaderStyle CssClass="GridViewHeader" />
                        <RowStyle CssClass="GridViewRow" />
                        <FooterStyle CssClass="GirdViewFooter" />
                        <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
                        <PagerStyle CssClass="GridViewPager" />
                        <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
                        <EmptyDataTemplate>
                            没有可用的数据</EmptyDataTemplate>
                    </asp:GridView>
                </fieldset>
            </td>
        </tr>
    </table>
</asp:Content>
